<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<h2>注册功能</h2>
<form action="/SignIn" method="get" onsubmit="return fromcheck()"> 
    <input type="text" name="username" id="usename"><br>
    <input type="password" name="password" id="password"><br>
    <input type="submit" value="点击注册">
</form>
</body>
<script>
    function fromcheck(){
        let username = $('#username').val();
        let password = $('#password').val();
        if(username!==""&&password!=""){
            return true;
        }
        else {
            return false;
        }
    }
    document.addEventListener('DOMContentLoaded', function() {
        // 获取URL参数
        var urlParams = new URLSearchParams(window.location.search);
        var loginFailed = urlParams.get('login') === 'false1';

        if (loginFailed) {
            alert('注册失败，该账户已存在');
        }
    });
</script>
</html>